<?php
declare(strict_types=1);

namespace app\admin\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class Toollabel extends Model
{

    protected $mapping = [
        'label_name' => 'labelName',
        'label_val' => 'labelVal',
        'create_time' => 'createTime',
        'update_time' => 'updateTime',
        'create_by' => 'createBy',
        'update_by' => 'updateBy'
    ];
    public function getMappedField($field)
    {
        $mapping =  array_search($field, $this->mapping);
        return $mapping ?? $field;
    }
}
